import { get, post } from "@/utils/request";
import { LoginType, RegisterType, billListType } from "@/utils/@type";

//注册
export const register = (data: RegisterType) => {
  return post("/user/register", data);
};

//登录
export const login = (data: LoginType) => {
  return post("/user/login", data);
};

// 获取用户信息
export const get_userinfo = () => {
  return get("/user/get_userinfo");
};

//获取账单列表
export const get_list = (data: billListType) => {
  return get("/bill/list", data);
};
